/**
 * @fileName FundController.java
 * @author xiaoyan.Huang
 * @email 645373484@qq.com
 * @date 上午8:52:07
 * @description TODO
 */
package com.thon.controller.home;

import java.util.Date;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.httpclient.params.HttpParams;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.thon.controller.util.BaseController;

/**
 * @author Xiaoyan.Huang
 * @Email 645373484@qq.com
 * @filename FundController.java
 * @date 上午8:52:07
 */
@Controller
@RequestMapping(value="/fund")
public class FundController extends BaseController {

    private static final Log log = LogFactory.getLog(HomeController.class);

	
	@RequestMapping(method = RequestMethod.GET)
	public String fund(Map<String, Object> map) {
		
		log.debug("");
		
		return "fund";
	}
	@RequestMapping(value = "/alipay",method = RequestMethod.POST)
	public String alipay(HttpServletRequest request,Model model) {
		Date date = new Date();
		String WIDtotal_fee = request.getParameter("WIDtotal_fee");
		String WIDout_trade_no = date.getTime()+"";
		String WIDsubject = "zemo";
		log.debug("充值"+WIDtotal_fee);
		
	/*	model.addAttribute("WIDtotal_fee", WIDtotal_fee);
		model.addAttribute("WIDout_trade_no", WIDout_trade_no);
		model.addAttribute("WIDsubject", WIDsubject);
		*/
		request.setAttribute("WIDout_trade_no", WIDout_trade_no);
		request.setAttribute("WIDtotal_fee", WIDtotal_fee);
		request.setAttribute("WIDsubject", WIDsubject);
		/*params.setParameter("WIDout_trade_no", WIDout_trade_no);
		params.setParameter("WIDtotal_fee", WIDtotal_fee);
		params.setParameter("WIDsubject", WIDsubject);*/
		return "alipay";
	}
	
}
